//
//  HMHorizontalGridView.h
//  Pods
//
//  Created by WangYong on 2017/9/12.
//
//

#import <UIKit/UIKit.h>

@class HMHorizontalGridView;

@protocol HMHorizontalGridViewDataSource <NSObject>

@required

//数量

- (NSInteger ) numberOfItemInHorizontalGridView:(HMHorizontalGridView *)horizontalGridView;

//标题
- (NSString *) horizontalGridView:(HMHorizontalGridView *)horizontalGridView titleForItemAtIndex:(NSInteger) index;

//图标路径
- (NSURL *) horizontalGridView :(HMHorizontalGridView *)horizontalGridView urlForItemAtIndex:(NSInteger ) index;

@end

@protocol HMHorizontalGridViewDelegate <NSObject>

//列数
- (NSInteger ) numberOfColumnsInHorizontalGridView:(HMHorizontalGridView *)horizontalGridView ;

//行数
- (NSInteger) numberOfRowsInHorizontalGridView:(HMHorizontalGridView *)horizontalGridView;

@end


@interface HMHorizontalGridView : UIView
#pragma mark - 属性 -

//默认图片
@property(strong ,nonatomic) UIImage *defaultImage;

//主题色
@property(strong ,nonatomic) UIColor *mainColor;

@property (weak ,nonatomic) id<HMHorizontalGridViewDataSource> datasource;

@property (weak ,nonatomic) id<HMHorizontalGridViewDelegate> delegate;

//刷新
- (void )reloadData;

@end
